package com.nuoniu.sibanyun.mapper.crm.call;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nuoniu.sibanyun.entity.crm.call.CrmCallAgent;
import com.nuoniu.sibanyun.entity.crm.call.dto.CrmCallAgentSearchDto;
import com.nuoniu.sibanyun.entity.crm.call.dto.CrmCallAgentUserDto;
import com.nuoniu.sibanyun.entity.crm.call.vo.CrmCallAgentCustomerVo;
import com.nuoniu.sibanyun.entity.crm.call.vo.CrmCallAgentUserVo;
import com.nuoniu.sibanyun.entity.vo.SelectVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 客户管理-坐席 Mapper 接口
 * </p>
 *
 * @author 白强
 * @since 2022-04-15
 */
public interface CrmCallAgentMapper extends BaseMapper<CrmCallAgent> {

    /**
     * 分页查询（超级管理）
     * @param page
     * @param crmCallAgentSearchDto
     * @return
     */
    Page<CrmCallAgent> pageCrmCallAgentBySystem(Page page,@Param("dto") CrmCallAgentSearchDto crmCallAgentSearchDto);

    /**
     * 分页查询(租户)
     * @param page
     * @param crmCallAgentSearchDto
     * @return
     */
    Page<CrmCallAgentCustomerVo> pageCrmCallAgentCustomerVo(Page page,@Param("dto") CrmCallAgentSearchDto crmCallAgentSearchDto);

    /**
     * 获取没有分配的用户
     * @param companyId
     * @return
     */
    List<SelectVo> selectNotDistributeUser(Integer companyId);

    /**
     * 坐席-用户分配情况
     * @param page
     * @param companyId
     * @param dto
     * @return
     */
    Page<CrmCallAgentUserVo> pageCrmCallAgentUserVo(Page page,Integer companyId, @Param("dto")CrmCallAgentUserDto dto);

}
